const state = {
  enterpriseCertificateWarn: 0, // 企业证件管理提示
  hrmsg: null,
  hrName: null,
  hrPhone: null,
}

const getters = {
  enterpriseCertificateWarn: state => state.enterpriseCertificateWarn,
  hrmsg: state => state.hrmsg,
  hrName: state => state.hrName,
  hrPhone: state => state.hrPhone,
}

const mutations = {
  setEnterpriseCertificateWarn (state, num) {
    state.enterpriseCertificateWarn = num
  },
  setHrmsg (state, msg) {
    state.hrmsg = msg
  },
  setHrName (state, name) {
    state.hrName = name
  },
  setHrPhone (state, phone) {
    state.hrPhone = phone
  }
}

const actions = {
  handleSetECMWarnCount ({ commit }, num) {
    commit('setEnterpriseCertificateWarn', num)
  },
  handleSetHrmsg ({ commit }, msg) {
    commit('setHrmsg', msg)
  },
  handleSetHrName ({ commit }, name) {
    commit('setHrName', name)
  },
  handleSetHrPhone ({ commit }, phone) {
    commit('setHrPhone', phone)
  },
}

export default {
  state,
  getters,
  mutations,
  actions
}
